<%@ tag description="Allows to close an open issue" pageEncoding="ISO-8859-1" %>
<%@ taglib prefix="iwebmvc" uri="http://tags.iwebmvc.com" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c-rt" %>
<%@ attribute name="issueClass" type="java.lang.Class" required="true" %>
<c-rt:set var="sessionUser" value="<%= org.internna.iwebmvc.security.UserManager.SESSION_USER %>" />
<c-rt:set var="subsession_id" value="<%= org.internna.iwebmvc.spring.jee.IWebMvcCombinedFilter.SUB_SESSION_COOKIE %>" />
<c-rt:set var="subsession_path" value="<%= org.internna.iwebmvc.spring.jee.IWebMvcCombinedFilter.SUB_SESSION_COOKIE_PATH %>" />
<input id="issueToClose" name="issueToClose" type="hidden" />
<input id="issueToCloseAlias" name="issueToCloseAlias" type="hidden" />
<div class="label" style="margin-bottom:3px"><iwebmvc:message argMessage="ui.issue.close.comment" /></div>
<div id="closeIssueCommentTextarea" class="border_${sessionScope[sessionUser].theme}" height="225" dojoType="dijit.Editor" style="height:225px;width:540px;"></div>
<div style="padding-top:2px" class="overclear">
    <div class="float_left">
        <iwebmvc:enum id="closeIssue" entityClass="${issueClass}" path="resolutionStatus" rows="10" helpText="ui.help.resolutionStatus" />
    </div>
    <div class="float_right" style="padding-top:8px;width:auto;">
        <span id="closeIssueValidationWarningContainer" class="validationWarning"></span>
        <span id="closeIssueLoadingContainer" style="display:none"><img src='<c:url value="resource.iwebmvc?file=images/loading.gif" />&${requestScope[subsession_path]}=${requestScope[subsession_id]}' alt='' /></span>
        <iwebmvc:button buttonId="closeIssueButton" label="ui.issue.actions.developer.close.save" buttonIcon="/resource.iwebmvc?file=/images/common/closed_${sessionScope[sessionUser].theme}.gif">
            closeIssue("${iwebmvc:inferDWRConvertedJavascriptClass(issueClass)}", byId("issueToCloseAlias").value, byId("issueToClose").value, dijit.byId("resolutionStatuscloseIssue").getValue(), dijit.byId("resolutionStatuscloseIssue").getDisplayedValue(), dijit.byId("closeIssueCommentTextarea").getValue());
        </iwebmvc:button>
    </div>
</div>